package com.nova.bluetooth.bean;

import com.dido.fastblelib.utils.HexUtil;

public class AdvertisingField {
    private int type;
    private byte[] data;

    public AdvertisingField(int type, byte[] data) {
        this.type = type;
        this.data = data;
    }

    public int getType() {
        return type;
    }

    public byte[] getData() {
        return data;
    }

    @Override
    public String toString() {
        return "AdData{" +
                "type=0x" + String.format("%02X", type) + // 格式化类型为两位十六进制
                ", data=0x" + HexUtil.encodeHexStr(data) +
                '}';
    }
}
